{ Statement: http://informatics.mccme.ru/moodle/mod/statements/view3.php?chapterid=1912
  Verdict: Accepted
}
uses
	SysUtils, Math;
 
const
	SP = ' ';
 
var
	i, ls : longint;
	s : string;
	ch : char;
 
begin
	reset(input,'input.txt');
	rewrite(output,'output.txt');
	readln(S);
	ls := length(S);
	i := 0;
	while i < ls do begin
		inc(i);
		ch := s[i];
		if ch <> SP then begin
			if ch in ['0'..'9'] then begin
				while (ch in ['0'..'9']) and (i <= ls) do begin
					write(ch);
					inc(i);
					if i <= ls then ch := s[i];
				end;
				dec(i);
				writeln;
			end else writeln(ch);
		end;	
	end;
end.